Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Fix(security): Sanitize queries in the list of service groups #12007

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

emabassi-ext
Copy link
Contributor

@emabassi-ext emabassi-ext commented Oct 18, 2022

Description

Queries should be sanitized (if possible) and bound using PDO statement to reduce attack surface and clean legacy code

Fixes # MON-15379

Type of change

  • Patch fixing an issue (non-breaking change)
  • New functionality (non-breaking change)
  • Breaking change (patch or feature) that might cause side effects breaking part of the Software

Target serie

  • 21.04.x
  • 21.10.x
  • 22.04.x
  • 22.10.x (master)

How this pull request can be tested ?

  1. navigate to service groups listing page
  2. add multiple sgroups
  3. check if sgroups are still visible for both (admin and non admin user)
  4. check if there is no error in log file

Checklist

Community contributors & Centreon team

  • I have followed the coding style guidelines provided by Centreon
  • I have commented my code, especially new classes, functions or any legacy code modified. (docblock)
  • I have commented my code, especially hard-to-understand areas of the PR.
  • I have rebased my development branch on the base branch (master, maintenance).

@emabassi-ext emabassi-ext self-assigned this Oct 18, 2022
@emabassi-ext emabassi-ext requested review from a team, TamazC and dmyios October 18, 2022 07:53
@emabassi-ext emabassi-ext changed the title Fix: Sanitize queries in the list of service groups Fix: Sanitize queries Oct 21, 2022
@sonarqube-decoration
Copy link

SonarQube Quality Gate

Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell C 10 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@emabassi-ext emabassi-ext changed the title Fix: Sanitize queries Fix(security): Sanitize queries in the list of service groups Oct 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants